const state = {
  appName: "淘海拾贝",
  lang: localStorage.getItem('lang')
}

const mutations = {
  SET_APPNAME: (state,val) => {
    state.appName = val
  },
  SET_LANGUAGE:(state,lang)=>{
		state.lang = lang
	},
}

const actions = {
  getAppName({ commit }) {
    commit('SET_APPNAME','淘海拾贝-')
  },
  setLanguage({commit},lang){
		localStorage.setItem('lang', lang);
		commit('SET_LANGUlocasAGE',lang)
	},
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
